var tplHTML = '{for i in list}<tr>'+
	'<td><a href="${path}/tutorinfo/detail/${i.id}" target="_blank">${i.uname}</a></td>'+
	'<td>${getCourse(i.subid)}</td>'+
	'<td>${i.schoolName}</td>'+
	'<td>${getTeachWay(i.way)}</td>'+
	'<td>${Date.parse(i.ludt)}</td>'+
	'<td>${i.area}</td>'+
	'</tr>{/for}';

var tpl = TrimPath.parseTemplate(tplHTML);

function nextPage() {
	$.ajax({
        type:'POST',
        url:path+'/tutorinfo/list',
        dataType:'json',
        success:function(page){
            var c=tpl.process(page);
            $('#list tr:not(:first-child)').remove();
            $('#list').append(c);
        }
    });
}
$(document).ready(function(){
    var page = new AjaxPage({tpl:tplHTML, url:path+'/tutorinfo/list', cb: function(page, data){
    	data.path=path;
    	var result = page.tpl.process(data);
    	$('#list tr:not(:first-child)').remove();
        $('#list').append(result);
    },page:{panel:'pagination',params:{}}});
    page.goPage(1);
	//nextPage();
	/*$('#next').click(function(){nextPage();});
    $('#pagination').pagination(1000,{prev_text:'前一页',next_text:'后一页',num_edge_entries:2,callback:function(i){
        alert(i);
    }
    });*/
});
